
package com.tspp.dao;

import com.tspp.dao.dto.Groupa;
import java.util.List;

/**
 * Interface for groupa dao. Contains crud operation
 * @author Maks
 */
public interface GroupaDao {
    /**
     * Inserts a new row in the GROUPA table.
     */
    public void insert(Groupa dto) throws DaoException;

    /**
     * Updates a single row in the GROUPA table.
     */
    public void update(int group, Groupa dto) throws DaoException;

    /**
     * Deletes a single row in the GROUPA table.
     */
    public void delete(int group) throws DaoException;

    /**
     * Returns all rows from the GROUPA table that match the criteria 'ID_GROUP = :idGroup'.
     */
    public Groupa findByPrimaryKey(int idGroup) throws DaoException;

    /**
     * Returns all rows from the GROUPA table that match the criteria ''.
     */
    public List<Groupa> findAll() throws DaoException;

    /**
     * Returns all rows from the GROUPA table that match the criteria 'ID_SPECIALITY = :idSpeciality'.
     */
    public List<Groupa> findBySpeciality(int idSpeciality) throws DaoException;

    /**
     * Returns all rows from the GROUPA table that match the criteria 'MAX_STUDENTS_NUMBER = :maxStudentsNumber'.
     */
    public List<Groupa> findWhereMaxStudentsNumberEquals(int maxStudentsNumber) throws DaoException;

    /**
     * Returns all rows from the GROUPA table that match the criteria 'CODE = :code'.
     */
    public List<Groupa> findWhereCodeEquals(String code) throws DaoException;
}
